﻿@using ZBJF.Warranty.BLL
@using ZBJF.Warranty.Common.Enums.InsuranceWarranty
@using ZBJF.Warranty.WebProvider
@using EnumHelper = ZBJF.Warranty.Common.Common.EnumHelper
@using ZBJF.Warranty.Common.Enums.InfoCollect
@using ZBJF.Warranty.Model
@model ZBJF.Warranty.Model.InsuranceWarrantyRecord
@{
    ViewBag.Title = "维修结果";
}
@Html.HiddenFor(m => m.ID)
@Html.HiddenFor(m => m.InsuranceOrderId)
<!--维修服务商审核-->
@RenderPage("~/Views/WorkOrderCommonInfo/AuditInfo.cshtml", new { type = "ShowResult", AuditProjectType = (byte)AuditProjectType.RepairCenter })
<!--维修完成信息收集-->
@RenderPage("~/Views/WorkOrderCommonInfo/InfoCollectItems.cshtml", new { type = "ShowResult", CollectWithType = (byte)CollectWithType.CompleteCollect })
@if (Model.WarrantyMaintenanceTypeID == (byte)WarrantyMaintenanceType.OfficialRepair) //自修时才显示
{
    <!--发票信息收集-->
    @RenderPage("~/Views/WorkOrderCommonInfo/InfoCollectItems.cshtml", new { CollectWithType = (byte)CollectWithType.ProofInvoice })
}
<!--通融历史-->
@RenderPage("~/Views/WorkOrderCommonInfo/InsuranceWarrantyBendTheRulesRecordInfo.cshtml")

<!--历史工单问题-->
@RenderPage("~/Views/WorkOrderCommonInfo/InsuranceOrderFeedbackHistory.cshtml")

<h4>寄回物流信息</h4>
@{
    var insuranceWarrantyRecordExpressInfo = Model.InsuranceWarrantyRecordExpressInfo.FirstOrDefault(o => o.ExpressSendByWhoType == (byte)ExpressSendByWhoType.RepairCenterSendToUser) ?? new InsuranceWarrantyRecordExpressInfo();
}
<form id="fromExpressInfo" enctype="multipart/form-data" method="post">
    <table class="table table-responsive table-bordered table-hover">
        @Html.HiddenFor(m => m.ID)
        <tr>
            <th>快递单号：</th>
            <td>@Html.TextBoxFor(n => insuranceWarrantyRecordExpressInfo.ExpressNo,new{disabled="disabled"})</td>
            <th>物流状态：</th>
            <td>@Html.TextBoxFor(n => insuranceWarrantyRecordExpressInfo.ExpressStatus, new { disabled = "disabled" })</td>
        </tr>
        <tr>
            <th>快递公司：</th>
            <td>@Html.DropDownListFor(n => insuranceWarrantyRecordExpressInfo.ExpressCompanyID, ZBJF.Warranty.WebProvider.ConvertToSelector.Instance.EnumTypeConvertToSelectList(typeof(ExpressEnums), (byte)ExpressEnums.SF), new { disabled = "disabled" })</td>
            <th class="w120">寄件人：</th>
            <td class="w-p25">@Html.TextBoxFor(n => insuranceWarrantyRecordExpressInfo.SendUserName, new { disabled = "disabled" })</td>

        </tr>
        <tr>
            <th class="w120">寄件人电话：</th>
            <td class="w-p25">@Html.TextBoxFor(n => insuranceWarrantyRecordExpressInfo.SendUserPhone, new { disabled = "disabled" })</td>
            <th>收件人：</th>
            <td>@Html.TextBoxFor(n => insuranceWarrantyRecordExpressInfo.ReceiverUserName, new { Value = string.IsNullOrEmpty(insuranceWarrantyRecordExpressInfo.ReceiverUserName) ? Model.Reporter : insuranceWarrantyRecordExpressInfo.ReceiverUserName, disabled = "disabled" })</td>
        </tr>
        <tr>
            <th>收件人电话：</th>
            <td>@Html.TextBoxFor(n => insuranceWarrantyRecordExpressInfo.ReceiverUserPhone, new { Value = string.IsNullOrEmpty(insuranceWarrantyRecordExpressInfo.ReceiverUserPhone) ? Model.ReporterPhone : insuranceWarrantyRecordExpressInfo.ReceiverUserPhone, disabled = "disabled" })</td>
            <th>收件人地址：</th>
            <td>@Html.TextBoxFor(n => insuranceWarrantyRecordExpressInfo.ReceiverUserAddress, new { Value = string.IsNullOrEmpty(insuranceWarrantyRecordExpressInfo.ReceiverUserAddress) ? Model.AccidentAddress : insuranceWarrantyRecordExpressInfo.ReceiverUserAddress, disabled = "disabled" })</td>
        </tr>
    </table>
</form>
<div class="form-actions text-center">
    <input class="btn Edit-R" type="button" value="关闭" id="btnCancel">
</div>

<script src="/Scripts/uploadAdapter/jquery.loadscript.js"></script>
<script src="/Scripts/uploadAdapter/jquery.uploadAdapter.js"></script>
<script src="/Scripts/WarrantyRecord/warrantyRecord.js"></script>